package com.wangzh.baseDataType;

import java.io.IOException;

public class Stringtest {
    public static void main(String[] args) {

        String hew = new String("hello word");
        String he = new String("hello");
        String word = new String("word");
        String word2 = new String("word");
        String hewo = new String("hello")+new String("word");
        String hewo4 = new String("hello")+new String("word");
        String hewo2 = he+new String("word");

        String hewo3="hello word";

        System.out.println(hew == hewo2);//false  只要有new都会去堆里面创建

        System.out.println(String.format("%10s", "AD"));
    }

}
